<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model common\models\GoodsExtra */

$this->title = '优惠设置';
$this->params['breadcrumbs'][] = ['label' => '优惠设置', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>

<div class="box">
    <div class="box-header">
        <div class="btn-group">
            <?= Html::a('<i class="fa fa-pencil"></i>', ['update', 'id' => $model->package_id], ['class' => 'btn btn-default']) ?>
            <?= Html::a('<i class="fa fa-trash-o"></i>', ['delete', 'id' => $model->package_id], [
                'class' => 'btn btn-default',
                'data' => [
                    'confirm' => '您确定要删除该用户吗？',
                    'method' => 'post',
                ],
            ]) ?>
            <!-- /.btn-group -->
        </div>
        <div class="pull-right">
            <?= Html::a('<i class="fa fa-reply"></i>', ['index'], ['class' => 'btn btn-default']) ?>
        </div>
    </div>
    <!-- /.box-header -->
    <div class="box-body no-padding">
        <?= DetailView::widget([
            'model' => $model,
            'attributes' => [
                'id',
                [
                    'attribute' => 'goods_id',
                    'value' => $model->good->goods_name
                ],
                [
                    'attribute' => 'group_id',
                    'value' => $model->group->group_name,
                ],
                [
                    'attribute' => 'group_id',
                    'value' => $model->package->package_name,
                ],
                [
                    'attribute' => 'sale',
                    'value' => $model->sale . '%',
                ],
                [
                    'attribute' => 'created_at',
                    'value' => date('Y-m-d H:i:s', $model->created_at),
                ]
            ],
        ]) ?>

    </div>
    <!-- /.box-body -->
</div>
